<title>操作日志</title>
<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a><cite>设置</cite></a>
        <a><cite>我的信息</cite></a>
        <a><cite>操作日志</cite></a>
    </div>
</div>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">操作日志</div>
        <div class="layui-card-body">
            <table class="layui-hide" id="LAY-set-user-log" lay-filter="LAY-set-user-log"></table>
        </div>
    </div>
</div>
<script type="text/javascript">

layui.use(['admin', 'table'], function() {
    var $ = layui.jquery,
    admin = layui.admin,
    table = layui.table;

    //分类管理
    table.render({
        elem: '#LAY-set-user-log',
        page: true,
        limit: 20,
        url: layui.cache.baseapi + '/api/set.user/log', //接口
        cols: [[
            { type: 'numbers', width: 100, title: 'ID'},
            { field: 'type', title: '操作', width: 80, templet: function(row) {
                switch (row.type) {
                    case 'insert':
                        return '添加';
                    case 'update':
                        return '修改';
                    case 'delete':
                        return '删除';
                }
            }},
            { field: 'remark', title: '操作描述', minWidth: 200},
            { field: 'createtime', title: '操作时间', width: 180 }
        ]],
        text: '对不起，加载出现异常！'
    });
});
</script>